#TODO 任意文件的复制
import os
source_file_name,suffix = os.path.splitext('风景.jpg')

# 读取源文件中的内容
source_file = open('test/风景.jpg',mode='rb')

# 新建复制文件
new_file_name = source_file_name + '-副本' + suffix
new_file = open(f'test/{new_file_name}',mode='ab')

while True:
    content = source_file.read(1024)
    new_file.write(content)
    if not content:
        break
